package com.namo.cchapi.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.time.LocalDateTime;

/**
 * @author WangXin
 * @date 2021/4/8 11:36
 */
@Configuration
@EnableScheduling
public class WechatConfig {

    //3.添加定时任务
    //或直接指定时间间隔，例如：5秒
    //@Scheduled(fixedRate=5000)

//    @Scheduled(cron = "0/3 * * * * ?")
//    private void configureTasks() {
//        System.out.println("执行静态定时任务时间: " + LocalDateTime.now());
//    }

}
